package com.job.createType.factoryMethod;

/**
 * @Author 王博
 * @DateTime 2025-04-08 12:00
 */
public class CoffeeShop {
    public static void main(String[] args) {
        CoffeeFactory coffeeFactory = new LatteeCoffeeFactory();
        Coffee coffee = CoffeeShop.createCoffee(coffeeFactory);
        System.out.println(coffee.getCoffeeName());
    }

    public static Coffee createCoffee(CoffeeFactory coffeeFactory) {
        return coffeeFactory.createCoffee();
    }
}
